package nsoft.swing.demo;

import nsoft.swing.annotation.AComponent;
import nsoft.swing.annotation.APanel;
import nsoft.swing.annotation.Type;
import nsoft.swing.engine.NPanel;

@APanel(name = "Test", layout = "BorderLayout", components = @AComponent(type = Type.LABEL, name = "Test", property = "demoPanel.center", layout = "Center"), fileds = {
		"demoPanel", "demoPanelFlow" })
public class PanelDemo {
	@AComponent(type = Type.PANEL, property = "demoPanel", layout = "East", properties = "Foreground:#CFBAFF")
	DemoPanelBean demoPanel = new DemoPanelBean();
	// @AComponent(type = Type.PANEL,property = "demoPanelFlow", layout =
	// "Center", properties = "Foreground:#CFBAFF")
	DemoPanelFlow demoPanelFlow = new DemoPanelFlow();

	public static void main(String[] args) {
		PanelDemo demo = new PanelDemo();
		demo.demoPanel.setCenter("Test");
		demo.demoPanel.setEast("east");
		demo.demoPanel.setNorth("north");
		demo.demoPanel.setSouth("south");
		demo.demoPanel.setWest("west");
		//NPanel builder = new NPanel();
		//builder.initialize();
		NPanel panel = new NPanel(demo, new Object[] { demo.demoPanel,
				demo.demoPanel });
		DisplayEngine.startEngine();
		DisplayEngine.show(panel);
	}

	public DemoPanelBean getDemoPanel() {
		return demoPanel;
	}

	public void setDemoPanel(DemoPanelBean demoPanel) {
		this.demoPanel = demoPanel;
	}

	public DemoPanelFlow getDemoPanelFlow() {
		return demoPanelFlow;
	}

	public void setDemoPanelFlow(DemoPanelFlow demoPanelFlow) {
		this.demoPanelFlow = demoPanelFlow;
	}

}
